import wizard
import pooler
from tools.misc import UpdateableStr,UpdateableDict
import time
import operator
from osv import osv, fields
from osv.orm import intersect
import tools.sql
from tools import config
from tools.translate import _
from mx import DateTime

class wizard_kdvn_list_of_receiveable_excel(wizard.interface):
   
    def _get_records(self, cr, uid, data, context={}):
        pool = pooler.get_pool(cr.dbname)
        ids=[]
        check=False
        kpfc_ids=pool.get("kdvn.payment.from.client").search(cr,uid,[('state','=','open')])

        data['ids']=kpfc_ids
        data['id'] = kpfc_ids[0]
     
        return {'ids' :kpfc_ids,'id':data['id'],'model':'kdvn.payment.from.client', 'title' : 'List of Receivable (xls)'}
        
    states = {
           'init': {
            'actions': [_get_records],
            'result': {
                'type': 'print',
                'name' : 'List of Receiveable (xls)',
                'report': 'list.of.receivable.items.xls.hidden',
                #'rml' : 'account_analytic_summary/report/progress_evaluation_sheet.jrxml',
                'state': 'end'
            },
        },
    }
wizard_kdvn_list_of_receiveable_excel('jreports.list_of_receiveable_excel')

